<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<style type="text/css">
h3
{
	margin-top: 70px;
	margin-left: 355px;
	margin-bottom: 40px;
}
#ulform
{
	margin-top:-20px;
	list-style: none;
}

#비밀번호변경
{
	margin: auto;
	margin-left:350px;
	width: 420px;
	height: 500px;
	background: url("${initParam.root }/img/main/find/main-findidpassword-background1.gif");
	background-repeat: no-repeat;
}

#idnemail
{
	background: url("${initParam.root }/img/main/find/main-findidpassword-background2.gif");
	background-repeat: no-repeat;
	height:300px;
	margin-top: 40px;
	margin-left:20px; 
}

.passtitle
{
	margin-top: 15px;
	margin-left: 25px;
}
.passinfo
{
	margin-top: 15px;
	margin-left: 30px;
}
.passid
{
	padding-top:10px;
	padding:2.5px;
	margin-left: -30px;
}	
#checkPass
{
	width: 120px;
	margin-left: 20px;
}
#password1
{
	margin-left: 10px;
	width: 120px;
}
#password2{
	margin-left: 21px;
	width: 120px;
}
#changePassword1
{
	margin-left: 8px;
	margin-top: -40px;
}
</style>	
<script type="text/javascript">

	$(document).ready(function(){
    	$("#changePassword1").click(function(){
    		if($("#checkPass").val() == ""){ 
    			alert("기존 패스워드를 입력하세요");
    			$("#checkPass").focus();
    			return;
    		} else if ($("#password1").val() == "") {
				alert("패스워드를 확인을 입력하세요");
				$("#password1").focus();
				return;
			} else if ($("#password2").val() == "") {
				alert("패스워드를 확인을 입력하세요");
				$("#password2").focus();
				return;
			} else if ($("#password1").val() != $("#password2").val()) {
				alert("비밀번호가 같지않습니다");
				$("#password1").val("");
				$("#password2").val("");
				$("#password1").focus();
				return;
			}else if($("#checkPass").val()== $("#password1").val()){
				alert("기존 비밀번호와 동일합니다.");
				$("#checkPass").val("");
				$("#password1").val("");
				$("#password2").val("");
				$("#checkPass").focus();
				return;
			}
    		$("#changePassword").submit();
    	});
    });
    
    
 </script>   
    
<h3><img src="${initParam.root }/img/main//updatePass/main-updatePass-title.gif" alt="제목" /></h3> 
<div id="비밀번호변경">
	<form id="changePassword" name="changePassword" action="${initParam.root }/member.do" method="post">
	<input type="hidden" name="command" value="changePassword">
	<img alt="title" src="${initParam.root }/img/main/updatePass/main-updatePass-sub.gif" class="passtitle"><br>
	<img alt="info" src="${initParam.root }/img/main/updatePass/main-updatePass-info.gif" class="passinfo">
		<div id="idnemail">
		<div id="idnemail_form">
			<ul id="ulform">
				<li class="passid"><img alt="기존 패스워드" src="${initParam.root }/img/main/updatePass/main-updatePass-oldpassword.gif"><input type="password" id="checkPass" name="m_password" value="${requestScope.idInfo}"></li>
				<li class="passid"><img alt="새로운비밀번호" src="${initParam.root }/img/main/updatePass/main-updatePass-password.gif"><input type="password" id="password1" name="password1"></li>
				<li class="passid">
					<img alt="비밀번호확인" src="${initParam.root }/img/main/updatePass/main-updatePass-newpassword.gif"><input type="password" id="password2" name="password2">
					<img alt="전송버튼" src="${initParam.root }/img/main/find/main-findidpassword-passwordBtn.jpg" id="changePassword1" style="cursor: pointer;">
				</li>
			</ul>
			</div>
		</div>
	</form>
</div>